import request from '@/utils/request'


const api_name = `/dep`

export default{

    //分页条件查询租户类型
    listPageByQuery(query){
        return request({
            url:`${api_name}`,
            method:'post',
            data:query
        })
    },
    //通过id删除部门
    deleteDepById(id){
        return request({
            url:`${api_name}/${id}`,
            method:'delete'
        })
    },
    batchDelete(ids){
        return request({
            url:`${api_name}/batchDelete`,
            method:'delete',
            data:ids
        })
    },
    getDepTree(){
        return request({
            url:`${api_name}/depTree`,
            method:'get'
        })
    },
    insertDep(dep){
        return request({
            url:`${api_name}`,
            method:'put',
            data:dep
        })
    }

}